package com.hutao.medical.service.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hutao.medical.dataSource.TargetDataSource;
import com.hutao.medical.mapper.medicalRecord.TreatmentTraceMapper;
import com.hutao.medical.service.TreatmentTraceService;

@Transactional
@Service
public class TreatmentTraceServiceImpl implements TreatmentTraceService{
	@Autowired
	private TreatmentTraceMapper treatmentTraceMapper;

	@TargetDataSource(name = "ds1")
	@Override
	public int insertTreatmentTrace(Map<String, Object> params) {
		return treatmentTraceMapper.insertTreatmentTrace(params);
	}

	@Transactional(readOnly = true)
	@TargetDataSource(name="ds1")
	@Override
	public long findCountByFirstGuidAndTraceTypeId(String firstGuid, Integer traceTypeId) {
		return treatmentTraceMapper.findCountByFirstGuidAndTraceTypeId(firstGuid, traceTypeId);
	}
	
	
	

}
